-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
file: add file_system_space #2597
Conversation
include/seastar/core/file-types.hh
Outdated
@@ -158,6 +159,18 @@ inline constexpr file_permissions operator&(file_permissions a, file_permissions | |||
return file_permissions(std::underlying_type_t<file_permissions>(a) & std::underlying_type_t<file_permissions>(b)); | |||
} | |||
|
|||
/// seastar::space_info is equivalent to std::filesystem::space_info | |||
/// with renamed members, to prevent a conflict with future::available() | |||
struct space_info { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use std::filesystem::space_info?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mentioned it in a comment.
The compiler complains about it due to the available
member conflicting with future::available
. I can reproduce and quote the error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can it conflict with future::available? It's in a different class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
v2 is rebased onto #2598 for now
}; | ||
}); | ||
}); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use coroutines in new code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in v2
c59710c
to
d9b772b
Compare
Draft until #2598 |
In v2 (cf0b6a5):
|
d9b772b
to
cf0b6a5
Compare
Return space_info for the filesystem identified by the given file name. space_info provides simpler and standard space information about the filesystem, in contrast to the posix statvfs which requires knowledge about the how to convert f_block to bytes by multiplying by f_frsize. Signed-off-by: Benny Halevy <[email protected]>
cf0b6a5
to
c80e451
Compare
|
Return space_info for the filesystem identified
by the given file name.
space_info provides simpler and standard space information about the filesystem, in contrast to the posix statvfs which requires knowledge about the how to convert
f_block to bytes by multiplying by f_frsize.